// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IdInput.cs" company="">
//   
// </copyright>
// <summary>
//   This  can be directly used (or inherited)
//   to pass an Id value to an application service method.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace Skymate.Services.Dtos
{
    using System;

    /// <summary>
    /// This <see cref="IInputDto"/> can be directly used (or inherited)
    ///     to pass an Id value to an application service method.
    /// </summary>
    /// <typeparam name="TId">
    /// Type of the Id
    /// </typeparam>
    public class IdInput<TId> : IInputDto
    {
        /// <summary>
        ///     Initializes a new instance of the <see cref="IdInput{TId}" /> class.
        /// </summary>
        public IdInput()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="IdInput{TId}"/> class.
        /// </summary>
        /// <param name="id">
        /// The id.
        /// </param>
        public IdInput(TId id)
        {
            this.Id = id;
        }

        /// <summary>
        ///     Gets or sets the id.
        /// </summary>
        public TId Id { get; set; }
    }

    /// <summary>
    ///     A shortcut of <see cref="IdInput{TPrimaryKey}" /> for <see cref="int" />.
    /// </summary>
    public class IdInput : IdInput<Guid>
    {
        /// <summary>
        ///     Initializes a new instance of the <see cref="IdInput" /> class.
        /// </summary>
        public IdInput()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="IdInput"/> class.
        /// </summary>
        /// <param name="id">
        /// The id.
        /// </param>
        public IdInput(Guid id)
            : base(id)
        {
        }
    }
}